# $Id$
# Maintainer : Ionut Biru <ibiru@archlinux.org>
# Contributor: Adam Hani Schakaki <krzd@krzd.net>

pkgname=caribou
pkgver=0.4.21+0+g36e3d0f
pkgrel=2
pkgdesc="A text entry and UI navigation application (on-screen keyboard)"
arch=('i686' 'x86_64')
url="http://live.gnome.org/Caribou"
license=(LGPL)
depends=(at-spi2-atk python-atspi python-gobject gtk3 libxklavier libgee clutter dconf)
makedepends=(intltool docbook-xsl gtk2 gobject-introspection vala git gnome-common)
options=(!emptydirs)
source=('git://git.gnome.org/caribou#commit=36e3d0fc89f0c5a61b1e2c3dd3c7970cd1b18f94')
sha256sums=('SKIP')

pkgver() {
  cd $pkgname
  git describe --long | sed -e 's/-/+/g' -e 's/^CARIBOU_//' -e 's/_/./g'
}

prepare() {
  cd $pkgname
  NOCONFIGURE=1 ./autogen.sh
}

build() {
  cd $pkgname

  ./configure --prefix=/usr --sysconfdir=/etc \
    --libexecdir=/usr/lib/$pkgname \
    --disable-static \
    --disable-schemas-compile

  # https://bugzilla.gnome.org/show_bug.cgi?id=655517
  sed -i -e 's/ -shared / -Wl,-O1,--as-needed\0/g' libtool

  make
}

check() {
  cd $pkgname
  make -k check
}

package() {
  cd $pkgname
  make DESTDIR="$pkgdir" install
}

# vim:set ts=2 sw=2 et:
